#include <assert.h>
#include "acaccountdao_factory.h"
#include "acaccountdao_stub4web.h"
#include "acaccountdao_stub4app.h"
//#include "acaccountdao.h"

using namespace erp::acaccount::dao;

bool CACAccountDaoFactory::s_ACAccountDaoInit = false;

IACAccountDao* CACAccountDaoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CACAccountDaoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_ACAccountDaoInit)
        {
            int iRetCode = CACAccountDao::Initialize();
            assert(iRetCode == 0);
            s_ACAccountDaoInit = true;
        }   	
        return (new CACAccountDao);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IACAccountDaoAsyc* CACAccountDaoFactory::GetAsycObject()
{
	return (new CACAccountDaoStub4App);
}
